package org.example;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@Component
@PropertySource(
        value = {"classpath:demo.properties"},
        encoding = "utf-8"
)
public class I {
    @Value("${name}")
    private String myname;

    public String getMyname() {
        return myname;
    }

    public void setMyname(String myname) {
        this.myname = myname;
    }

    @Override
    public String toString() {
        return "I{" +
                "myname='" + myname + '\'' +
                '}';
    }
}
